<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8"/>
    <title>送货地址维护</title>
    <meta name="keywords" content="address,deliver,manage"/>
    <meta name="description" content="送货,地址,地址维护"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <link rel="stylesheet" href="./assets/css/validationEngine.jquery.css" type="text/css">
    <script src="./assets/js/jquery.validationEngine-zh_CN.js" type="text/javascript" charset="utf-8"></script>
    <script src="./assets/js/jquery.validationEngine.js" type="text/javascript" charset="utf-8"></script>
    <!-- basic styles -->

</head>
<body>
<div class="page-content page-content2">
    <div class="row">
        <div class="col-xs-12">
            <form id="stationFormId" class="form-horizontal" role="form">
                <div class="input-group input-group-sm input-group-sm3">
                    <span class="input-group-addon group-addon">车站名称</span>
                    <select class="selectAllStation form-control col-sm-1 form-control-two" id="stationSelects"
                         onchange=$("#stationFormId").submit()>
                         </select>&nbsp;
                    <button id="dataSearch" class="btn btn-primary btn-sm" title="查询">
                        <i class="icon-search nav-search-icon"></i>
                    </button>
                    <button id="dataadd" type="button" class="btn btn-primary btn-sm"
                            data-toggle="modal" data-target="#addModal" title="地址添加">
                        <i class="icon-plus-sign bigger-120"></i>
                    </button>
                    <button id="datachange" type="button" class="btn btn-sm btn-success"
                            data-toggle="modal" data-target="#updateModal" disabled
                            title="地址修改">
                        <i class="icon-pencil bigger-130"></i>
                    </button>
                    <button id="datadelete" type="button" class="btn btn-sm btn-danger"
                            data-toggle="modal" data-target="#deleteModal" disabled
                            title="删除任务">
                        <i class="icon-trash bigger-130"></i>
                    </button>
                    <!-- </div>	 -->
                </div>
            </form>

            <div class="row" style="margin-top: 0px;">
                <div class="col-xs-12">
                    <!-- PAGE CONTENT BEGINS -->
                    <table id="deliverAddress_table" class="table"></table>
                    <!-- PAGE CONTENT ENDS -->
                </div>
                <!-- /.col -->
            </div>
        </div>
    </div>
</div>
<!-- /.page-content -->


<!-- 添加的modal start-->
<div class="modal fade bs-example-modal-lg" id="addModal" >
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                        aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="exampleModalLabel">地址添加</h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal" id="addForm" data-type="add">
                    <div class="form-group">
                        <label class="col-sm-2 control-label">所属车站</label>
                        <div class=" col-sm-3">
                            <select class="form-control selectAllStation" name="stationId">

                            </select>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-2 control-label">地址</label>
                        <div class="col-sm-10">
                            <input type="text" class="validate[required] form-control" name="address"
                                   placeholder="请输入送货地址">
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-2 control-label">排序方式</label>
                        <div class="col-sm-10">
                            <select class="validate[required ] form-control" id="form-field-select-3" name="orderNo">
                                <option value="1">1</option>
                                <option value="2">2</option>
                                <option value="3">3</option>
                                <option value="4">4</option>
                                <option value="5">5</option>
                                <option value="6">6</option>
                                <option value="7">7</option>
                                <option value="8">8</option>
                                <option value="9">9</option>
                                <option value="10">10</option>
                                <option value="11">11</option>
                                <option value="12">12</option>
                                <option value="13">13</option>
                                <option value="14">14</option>
                                <option value="15">15</option>
                                <option value="16">16</option>
                                <option value="17">17</option>
                                <option value="18">18</option>
                                <option value="19">19</option>
                                <option value="20">20</option>
                            </select>
                        </div>
                    </div>
                </form>

            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" name="submit" data-type="add">保存</button>
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
            </div>
        </div>
    </div>
</div>
<!-- 添加的modal end-->

<!-- 修改的modal start-->
<div class="modal fade" id="updateModal"  role="dialog" aria-labelledby="exampleModalLabel">
    <div id="modalDialog" class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                        aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="exampleModalLabel">送货修改</h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal" id="updateForm" data-type="update">
                    <div class="form-group" hidden>
                        <label class="col-sm-2 control-label">ID</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" name="deliverAddressId"
                                   placeholder="deliverAddressId">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">所属车站</label>
                        <div class="col-sm-3">
                            <select class="form-control selectAllStation" name="stationId">

                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">地址</label>
                        <div class="col-sm-10">
                            <input type="text" class="validate[minSize[2],maxSize[50]] form-control" name="address"
                                   placeholder="address">
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-2 control-label">排序方式</label>
                        <div class="col-sm-10">
                            <select class="form-control" name="orderNo" placeholder="orderNo">
                                <option value="1">1</option>
                                <option value="2">2</option>
                                <option value="3">3</option>
                                <option value="4">4</option>
                                <option value="5">5</option>
                                <option value="6">6</option>
                                <option value="7">7</option>
                                <option value="8">8</option>
                                <option value="9">9</option>
                                <option value="10">10</option>
                                <option value="11">11</option>
                                <option value="12">12</option>
                                <option value="13">13</option>
                                <option value="14">14</option>
                                <option value="15">15</option>
                                <option value="16">16</option>
                                <option value="17">17</option>
                                <option value="18">18</option>
                                <option value="19">19</option>
                                <option value="20">20</option>
                            </select>
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" name="submit" data-type="update">保存</button>
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
            </div>
        </div>
    </div>
</div>
<!-- 修改的modal end-->

<!-- 删除的modal start-->
<div class="modal fade" id="deleteModal" tabindex="-1">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                        aria-hidden="true">×</span></button>
                <h4 class="modal-title" id="myModalLabel">删除任务</h4>
            </div>
            <!--Form的id为myForm-->
            <form id="deleteForm" data-type="delete">
                <div class="modal-body">
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                    <button type="button" class="btn btn-primary" name="submit" data-type="delete">确认</button>
                </div>
            </form>
        </div>
    </div>
</div>
<!-- 删除的modal end-->

<script src="script/deliveraddress.js"></script>
</body>
</html>
